]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
viewSelector: Mirror open-app-view edge drag gesture for RTL
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 14 Mar 2015 21:49:22 +0000 (22:49 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 15 Mar 2015 18:41:44 +0000 (19:41 +0100)
It makes sense for the gesture to reflect the position of the
activities button / dash. In RTL locales, those are located on
the right rather than the left, so make the gesture apply to
the opposite edge in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=737502

js/ui/viewSelector.js

index 34711fdee829d4596b4938e892992db54229e67e..648f6fa7607c2e2a97c46d096f6f45c470bd58e8 100644 (file)
@@ -214,10 +214,13 @@ const ViewSelector = new Lang.Class({
                               Shell.ActionMode.OVERVIEW,
                               Lang.bind(Main.overview, Main.overview.toggle));
 
-        let gesture;
-
-        gesture = new EdgeDragAction.EdgeDragAction(St.Side.LEFT,
-                                                    Shell.ActionMode.NORMAL);
+        let side;
+        if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
+            side = St.Side.RIGHT;
+        else
+            side = St.Side.LEFT;
+        let gesture = new EdgeDragAction.EdgeDragAction(side,
+                                                        Shell.ActionMode.NORMAL);
         gesture.connect('activated', Lang.bind(this, function() {
             if (Main.overview.visible)
                 Main.overview.hide();